package cn.buk.tms.entity.misc;

import java.util.Date;
import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;

/**
 * 数据字段信息
 * @author yfdai
 */
@Entity
@Table(name = "data_field_info")
public class DataFieldInfo {

    /**
     * 通用字段（一般指账单的头信息）
     */
    public static final int DATA_TYPE_GENERAL = 0;
    /**
     * 机票相关字段（机票通用）
     */
    public static final int DATA_TYPE_FLIGHT = 1;
    /**
     * 机票销售字段（仅用于销售订单或账单）
     */
    public static final int DATA_TYPE_FLIGHT_TICKET = 1001;
    /**
     * 机票退票字段（仅用于退票订单或账单）
     */
    public static final int DATA_TYPE_FLIGHT_REFUND = 1002;
    /**
     * 机票改签字段（仅用于改签订单或账单）
     */
    public static final int DATA_TYPE_FLIGHT_CHANGE = 1003;
    public static final int DATA_TYPE_HOTEL = 2;
    public static final int DATA_TYPE_TRAIN = 3;
    public static final int DATA_TYPE_VAS = 4;
    /**
     * 用车
     */
    public static final int DATA_TYPE_CAR = 5;

    @Id
    private int id;

    /**
     * 数据字段的默认名称
     */
    @Column(length = 50)
    private String name;

    /**
     * 数据类型
     * 0 - 通用
     * 1 - 机票
     * 2 - 酒店
     * 3 - 火车票
     * 4 - 增值服务
     */
    @Column(name = "data_type")
    private int dataType;


    @Column(name="create_time", insertable = false, updatable = false)
    private Date createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getDataType() {
        return dataType;
    }

    public void setDataType(int dataType) {
        this.dataType = dataType;
    }
}
